<cds-modal size="md"
           [open]="true"
           [hasScrollingContent]="true"
           (overlaySelected)="closeModal()">
  <cds-modal-header (closeSelect)="closeModal()">
    <h3 cdsModalHeaderHeading
        i18n>Purge Trash</h3>
  </cds-modal-header>

  <section cdsModalContent>
    <form name="purgeForm"
          class="form"
          #formDir="ngForm"
          [formGroup]="purgeForm"
          novalidate>
      <p i18n>To purge, select&nbsp;
        <kbd>All</kbd>&nbsp;
        or one pool and click&nbsp;
        <kbd>Purge</kbd>.&nbsp;</p>

      <div class="form-item">
        <cds-select label="Pool"
                    for="poolName"
                    id="poolName"
                    formControlName="poolName"
                    *ngIf="poolPermission.read">
          <option value=""
                  i18n>All</option>
          <option *ngFor="let pool of pools"
                  [value]="pool">{{ pool }}</option>
        </cds-select>
      </div>
    </form>
  </section>

  <cd-form-button-panel (submitActionEvent)="purge()"
                        [form]="purgeForm"
                        [submitText]="actionLabels.PURGE"
                        [modalForm]="true"></cd-form-button-panel>

</cds-modal>
